{% extends "base.html" %}

{% load i18n package_tags page_metadata_tags %}
{% load render_table from django_tables2 %}

{% block metadata %}
    {% translate "Welcome" as trans_title %}
    {% page_metadata page_title=trans_title %}
{% endblock metadata %}

{% block extra_head %}
    {{ block.super }}
    {% include 'includes/_ethicalads-js.html' %}
{% endblock extra_head %}

{% block body_class %}home{% endblock %}

{% block breadcrumb %}
    <div class="breadcrumb">
        <div class="container">
            <div class="row">
                <div class="col-xs-12">
                    <h2><a
                        href="{% url 'categories' %}">{% translate "Categories" %}</a> ›› {{ category.title_plural }}
                        ( {{ table.paginator.count }} )</h2>
                </div>
            </div>
        </div>
    </div>
{% endblock breadcrumb %}

{% block body %}
    <div class="row">
        <div class="col-xs-12">
            <p>{{ category.description }}</p>
            {% if request.user.is_authenticated and profile.can_add_package %}
                <p>
                    <a class="btn btn-primary" href="{% url 'add_package' %}">{% translate "Add Package »" %}</a>
                </p>
            {% endif %}
            {% with ea_id="category-detail" ea_type="text" %}
                {% include 'includes/_ethicalads-tag.html' %}
            {% endwith %}
        </div>
    </div>

    <div class="row">
        <div class="col-xs-12">
            <div class="row">
                <div class="col-xs-12">
                    {% render_table table %}
                </div>
            </div>
        </div>
    </div>
{% endblock body %}
